const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    id: Number, //评论id
    articleId: String, //文章id
    name: String, //昵称
    image: Number, //头像
    time: String, //评论日期
    content: String, //评论内容
    status: { //已读未读
        type: Number,
        default: 0
    },
    type: { //评论类型 1 评论  2 回复  3 深度回复

    },
    parentId: Number, //评论父级id
    replyName: String, //父级评论人名称
    replyEmail: String, //父级评论人邮箱
    admin: Boolean //是否是管理员
})

module.exports = mongoose.model('comment', schema)